import 'package:baselib/utils/image_util.dart';
import 'package:baselib/utils/px_base_util.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/services.dart';
import 'package:framelib/base/base_view.dart';
import 'package:framelib/config/app_config.dart';
import 'package:framelib/utils/color_util.dart';
import 'package:framelib/utils/drawable_util.dart';
import 'package:framelib/utils/px_util.dart';
import 'package:framelib/widgets/comm_app_bar.dart';
import 'package:framelib/widgets/nosize_app_bar.dart';
import 'package:framelib/widgets/page_widget_manager.dart';
import 'package:get/get.dart';
import 'package:flutter/material.dart';
import 'package:module_business/index/viewmodel/index_view_model.dart';

class IndexPage extends GetWidget {
  @override
  Widget build(BuildContext context) {
    return PageTabBuild<IndexViewModel>(
        initController: Get.put(IndexViewModel(), tag: 'IndexViewModel'),
        tag: 'IndexViewModel',
        builder: (viewModel) {
          return PageWidgetManager.buildPage(
              context: context,
            backgroundColor: color_main_half,
            appBar: CommAppBar(
              backgroundColor: color_transparent,
              title: Text(
                '首页',
              ),
            ),
            body: Container(
              child: Center(
                child: MaterialButton(
                  onPressed: ()=>viewModel.toNext(),
                  color: Colors.cyanAccent,
                  child: Text(
                    '点击'
                  ),
                ),
              ),
            ),
          );
        });
  }
}
